class FriendChannel < ApplicationCable::Channel
  def subscribed
    Rails.logger.info "susubscribed ..."
    stream_from "friend_channel_#{push_store.id}"
  end

  def unsubscribed
    # Any cleanup needed when channel is unsubscribed
  end

  def send_message(data)
    Rails.logger.info "发送消息的这个方法"
    ActionCable.server.broadcast 'order_channel', { message: "message", user: "current_user" }
  end

end
